﻿using System.Text;

namespace IIS根据9期更改版
{
    public class HttpResponse
    {
        public string StateCode { get; set; }
        public string StateDes { get; set; }

        public string ContentType { get; set; }
        public byte[] Body { get; set; }
        public byte[] GetResponseHeader()
        {
            string strRequestHeader = string.Format(@"HTTP/1.1 {0} {1}
        Content-Type:{2}
Connection: keep-alive
Server: cloudflare-nginx
Content-Length:{3}

",StateCode,StateDes,ContentType,Body.Length);

            return Encoding.UTF8.GetBytes(strRequestHeader);

        }
    }
}